package com.jiyun.fegin;

import com.github.pagehelper.PageInfo;
import com.jiyun.common.model.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @projectName: 2210A-project1
 * @package: com.jiyun.fegin
 * @className: GameFegin
 * @author: 耿嘉军
 * @date: 2023/8/23 19:32
 * @version: 1.0
 */
@FeignClient(value = "day08game")
public interface GameFegin {

    @RequestMapping("/game/gameList")
    public List<Game> gameList();

    @RequestMapping("/game/gameAndTag")
    public PageInfo<GameVO> gameAndTag(@RequestBody GameDto dto);

    @RequestMapping("/game/saveTeamAndGame")
    public boolean saveTeamAndGame(@RequestParam("playId") Integer playId,@RequestParam("gid") Integer gid,@RequestParam("teamId")Integer teamId);

    @RequestMapping("/game/findByPlay")
    public GameTeam findByPlay(@RequestParam("gid") Integer gid,@RequestParam("pid") Integer pid);

    @RequestMapping("/game/gameAndTeamAndPlayAndTag")
    public BeginTrain gameAndTeamAndPlayAndTag(@RequestParam("gameId") Integer gameId,@RequestParam("teamId") Integer teamId,@RequestParam("playId") Integer playId);

    @RequestMapping("/game/findGamePaper")
    public List<Paper> findGamePaper(@RequestParam("gameId") Integer gameId);
}
